import request from '@/common/utils/request'


/**
 * 获取-用户消息
 * @returns
 */
export const getSysMessageApi = () => {
    return request({
        url: '/sys/message',
        method: 'GET'
    })
}

/**
 * 通知-群发通知
 * @returns
 */
export const postSysMessageMuchApi = (data) => {
    return request({
        url: '/sys/messageMuch',
        method: 'POST',
        data
    })
}

/**
 * 更新某个消息的状态为已读
 * @returns
 */
export const putSysMessageIdApi = (id: number) => {
    return request({
        url: `/sys/message/${id}`,
        method: 'PUT'
    })
}


/**
 * 删除信息
 * @returns
 */
export const deleteSysMessageIdApi = (id: number) => {
    return request({
        url: `/sys/message/${id}`,
        method: 'DELETE'
    })
}